﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace Medianamik.UI.ConfigManagement
{
	public partial class PageList : BasePage
    {
        #region Events

        protected void Page_Init(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                TabStrip.SelectedIndex = SelectedTabIndex;
                MultiPage.SelectedIndex = SelectedTabIndex;
            }
        }

        protected void Page_Load(object sender, EventArgs e)
		{

		}

        #endregion

        #region Properties

        protected int SelectedTabIndex
        {
            get
            {
                int index;
                if (int.TryParse(Request["tab"] ?? string.Empty, out index))
                {
                    return Math.Min(Math.Max(index, 0), 2);
                }
                return 0;
            }
        }

        #endregion
    }
}
